
# Packages
#install.packages("mokken")
library(mokken)




### 2017 ###

# Data
data2017 <- read.csv("Scaling2017.csv")

# Economic redistribution
newdata <- data2017[,c("q7","q8rev","q11rev","q13")]
redistr <- na.omit(newdata)
coefH(redistr)
mon <- check.monotonicity(redistr)
summary(mon)
check.reliability(redistr)


# State intervention
newdata <- data2017[,c("q12","q18")]
statint <- na.omit(newdata)
coefH(statint)
mon <- check.monotonicity(statint)
summary(mon)
check.reliability(statint)


# Environmental protection
newdata <- data2017[,c("q17rev","q26")]
env <- na.omit(newdata)
coefH(env)
mon <- check.monotonicity(env)
summary(mon)
check.reliability(env)





### 2019 ###


# Data
data2019 <- read.csv("Scaling2019.csv")


# Economic redistribution
newdata <- data2019[,c("q10rev","q11rev","q13")]
redistr <- na.omit(newdata)
coefH(redistr)
mon <- check.monotonicity(redistr)
summary(mon)
check.reliability(redistr)


# State intervention
newdata <- data2019[,c("q12","q14","q15","q25")]
statint <- na.omit(newdata)
coefH(statint)
mon <- check.monotonicity(statint)
summary(mon)
check.reliability(statint)


# Environmental protection
newdata <- data2019[,c("q16","q18")]
env <- na.omit(newdata)
coefH(env)
mon <- check.monotonicity(env)
summary(mon)
check.reliability(env)




